import request from '@/utils/request'

// 查询学生表列表
export function listStudent(query) {
  return request({
    url: '/student/student/list',
    method: 'get',
    params: query
  })
}

// 根据班级id查询
export function getStudents(studentClass) {
  return request({
    url: '/student/student/list/'+studentClass,
    method: 'get',
  })
}

// 查询学生表详细
export function getStudent(id) {
  return request({
    url: '/student/student/' + id,
    method: 'get'
  })
}

// 新增学生表
export function addStudent(data) {
  return request({
    url: '/student/student',
    method: 'post',
    data: data
  })
}

// 导入
export function Upload(data) {
  return request({
    url: '/student/student/importExcel',
    method: 'post',
    data: data
  })
}

// 修改学生表
export function updateStudent(data) {
  return request({
    url: '/student/student',
    method: 'put',
    data: data
  })
}

// 删除学生表
export function delStudent(id) {
  return request({
    url: '/student/student/' + id,
    method: 'delete'
  })
}
// 查询所有班级
export function getListClasses(query) {
  return request({
    url: '/student/class/list',
    method: 'get',
    params: query
  })
}

// 修改学生状态
export function updateStudents(data) {
  return request({
    url: '/student/student/updateStudents',
    method: 'put',
    data: data
  })
}
